home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / A-line / Scripts / DepMake.mk < prev    next >
Encoding:
Text File  |  2000-06-24  |  1.3 KB  |  57 lines

  1. # DepMAke.mk
  2. #
  3. # Notes:
  4.  
  5. #DEPSMK *= ":<Pre-gen>:Dependencies.mk"
  6. DEPSDIRNAME *= [Dependencies]
  7.  
  8. #.INCLUDE : ":<Pre-gen>:Sources.mk"
  9. #.INCLUDE : ":<Pre-gen>:Imports.mk"
  10. #.INCLUDE : $(DEPSMK)  # Is this kosher -- to include the file we're updating?
  11. .INCLUDE : ":(Temporary):Include.mk"
  12.  
  13. QQ = "
  14. ALLSRCS = $(SRCS) $(MORESRCS)
  15. ALLDEPS = $(ALLSRCS:b:+".d")
  16.  
  17. # The default target.
  18. default : test depmake
  19.  
  20. # Used for debugging makefiles.
  21. test :;
  22. #    echo ALLDEPS = '$(ALLDEPS)'
  23.  
  24. depsdir : ":$(DEPSDIRNAME):"
  25.  
  26. ":%:" : "$(@:d:d)"  # This should work perfectly, but it doesn't.  dmake sucks.
  27. #    Echo $$* = $*
  28. #    Echo $$@ = $@
  29. #    Echo $$(@:d:d) = $(@:d:d)
  30.     Echo "Creating the $* directory."
  31.     Echo "> $*"
  32.     NewFolder '$@'
  33.  
  34. #depmake : depsdir $(DEPSMK)
  35. depmake : depsdir
  36.  
  37. #$(DEPSMK) : $(ALLDEPS)
  38. #    Echo "Concatenating dependencies..."
  39. #    Echo "# Make dependencies generated automatically by MakeDepend." > $(DEPSMK)
  40. #    Echo "" >> $(DEPSMK)
  41. #    Catenate `Files -f ":$(DEPSDIRNAME):"` >> $(DEPSMK)
  42. #    SetFile -c 'R*ch' $(DEPSMK)
  43.  
  44. #%.d .UPDATEALL :| %.cc %.cpp %.cp %.c
  45. %.d :| %.cc %.cpp %.cp %.c
  46. #    Echo "$$? = $?"
  47. #    Echo "$$& = $&"
  48. #    Echo "$$< = $<"
  49. #    Echo "$$^ = $^"
  50.     Echo "Analyzing dependencies for '$(<)'."
  51.     MakeDepend.pl --scf "$<"
  52.     SetFile -c 'R*ch' "$@"
  53.  
  54. .SOURCE.d : ":$(DEPSDIRNAME):"
  55.  
  56. .PHONY : test depmake depsdir
  57.